Move double $wgOut globals to the top, remove $wgLang duplicated global.
authorPlatonides <platonides@users.mediawiki.org>
Sun, 25 Jul 2010 18:24:29 +0000 (18:24 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sun, 25 Jul 2010 18:24:29 +0000 (18:24 +0000)
includes/specials/SpecialContributions.php
includes/specials/SpecialMovepage.php
includes/specials/SpecialNewpages.php
includes/specials/SpecialUserlogin.php

index d960791..8885909 100644 (file)
@@ -380,16 +380,14 @@ class SpecialContributions extends SpecialPage {
         * @param $type String
         */
        protected function feed( $type ) {
-               global $wgFeed, $wgFeedClasses, $wgFeedLimit;
+               global $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgOut;
 
                if( !$wgFeed ) {
-                       global $wgOut;
                        $wgOut->addWikiMsg( 'feed-unavailable' );
                        return;
                }
 
                if( !isset( $wgFeedClasses[$type] ) ) {
-                       global $wgOut;
                        $wgOut->addWikiMsg( 'feed-invalid' );
                        return;
                }
index 8fa5ea8..450c210 100644 (file)
@@ -365,7 +365,7 @@ class MovePageForm {
                        # Disallow deletions of big articles
                        $bigHistory = $article->isBigDeletion();
                        if( $bigHistory && !$nt->userCan( 'bigdelete' ) ) {
-                               global $wgLang, $wgDeleteRevisionsLimit;
+                               global $wgDeleteRevisionsLimit;
                                $this->showForm( array('delete-toobig', $wgLang->formatNum( $wgDeleteRevisionsLimit ) ) );
                                return;
                        }
index 125a8b2..e0bd309 100644 (file)
@@ -325,16 +325,14 @@ class SpecialNewpages extends IncludableSpecialPage {
         * @param $type String
         */
        protected function feed( $type ) {
-               global $wgFeed, $wgFeedClasses, $wgFeedLimit;
+               global $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgOut;
 
                if ( !$wgFeed ) {
-                       global $wgOut;
                        $wgOut->addWikiMsg( 'feed-unavailable' );
                        return;
                }
 
                if( !isset( $wgFeedClasses[$type] ) ) {
-                       global $wgOut;
                        $wgOut->addWikiMsg( 'feed-invalid' );
                        return;
                }
index ecabb9f..c2f4279 100644 (file)
@@ -182,7 +182,7 @@ class LoginForm {
         * @private
         */
        function addNewAccount() {
-               global $wgUser, $wgEmailAuthentication;
+               global $wgUser, $wgEmailAuthentication, $wgOut;
 
                # Create the account and abort if there's a problem doing so
                $u = $this->addNewAccountInternal();
@@ -197,7 +197,6 @@ class LoginForm {
 
                # Send out an email authentication message if needed
                if( $wgEmailAuthentication && User::isValidEmailAddr( $u->getEmail() ) ) {
-                       global $wgOut;
                        $error = $u->sendConfirmationMail();
                        if( WikiError::isError( $error ) ) {
                                $wgOut->addWikiMsg( 'confirmemail_sendfailed', $error->getMessage() );
@@ -224,7 +223,6 @@ class LoginForm {
                        }
                } else {
                        # Confirm that the account was created
-                       global $wgOut;
                        $self = SpecialPage::getTitleFor( 'Userlogin' );
                        $wgOut->setPageTitle( wfMsgHtml( 'accountcreated' ) );
                        $wgOut->setArticleRelated( false );